#!/usr/bin/env python
# -*- coding: UTF-8 -*-

import unittest
import zyxel_main

"""
Methods whose names start with the string 
test with one argument (self) in classes 
derived from unittest.TestCase are test cases.
"""
       
class myTestBasic(unittest.TestCase):       
    def testSpaceAvailable(self):
        "test volného místa na disku:"
#        sp = zyxel_main.DwgBackup("/home/petr")
        sp = zyxel_main.VideoFileTranscoder(zyxel_main.zdroj,
                                            zyxel_main.cil, 
                                            testOnly = True, 
                                            verbose = True
                                            )
#        print sp.freeDiskSpacePercent, "%"
        self.assertLessEqual(sp.freeDiskSpacePercent, 90)
        

#    def test_basic1(self):
#        "Basic with setup"
#        self.assertNotEqual(self.a, 2)
#
#    def test_basic2(self):
#        "Basic2 with setup"
#        assert self.a != 2
#
#    def test_fail(self):
#        "This test should fail"
#        assert self.a == 2


def main():
    suite = unittest.TestLoader().loadTestsFromTestCase(myTestBasic)
    unittest.TextTestRunner(verbosity=2).run(suite)

if __name__ == '__main__':
    main()
